home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / freeWAIS-sf-1.1 / FIELD-EXAMPLE / Imakefile < prev    next >
Encoding:
Makefile  |  1994-10-11  |  3.7 KB  |  134 lines

  1. ############################ -*- Mode: Makefile -*- ###########################
  2. ## Imakefile -- 
  3. ## ITIID           : $ITI$ $Header $__Header$
  4. ## Author          : Ulrich Pfeifer
  5. ## Created On      : Fri Feb 25 13:30:41 1994
  6. ## Last Modified By: Ulrich Pfeifer
  7. ## Last Modified On: Wed Oct 12 13:39:08 1994
  8. ## Update Count    : 88
  9. ## Status          : Unknown, Use with caution!
  10. ###############################################################################
  11.  
  12. #include "../Install.tmpl"
  13.         WAISINDEX = ../ir/waisindex
  14.             WAISQ = ../ui/waisq
  15.        WAISSEARCH = ../ui/waissearch
  16.             SWAIS = ../ui/swais
  17.              SRCG = TEST TEST.german
  18.               SRC = TEST
  19.          RESFILES = \
  20.                 test.cat \
  21.                 test.doc \
  22.                 test.doc \
  23.                 test.fn \
  24.                 test.hl \
  25.                 test.inv \
  26.                 test.src \
  27.                 test.dct \
  28.                 test_field_au.inv \
  29.                 test_field_ck.inv \
  30.                 test_field_jt.inv \
  31.                 test_field_names.inv \
  32.                 test_field_py.inv \
  33.                 test_field_ti.inv \
  34.                 test_field_au.dct \
  35.                 test_field_ck.dct \
  36.                 test_field_py.dct \
  37.                 test_field_ti.dct \
  38.                 test_field_jt.dct \
  39.                 testg.cat \
  40.                 testg.doc \
  41.                 testg.doc \
  42.                 testg.fn \
  43.                 testg.hl \
  44.                 testg.inv \
  45.                 testg.src \
  46.                 testg.dct \
  47.                 testg_field_au.inv \
  48.                 testg_field_ck.inv \
  49.                 testg_field_jt.inv \
  50.                 testg_field_names.inv \
  51.                 testg_field_py.inv \
  52.                 testg_field_ti.inv \
  53.                 testg_field_au.dct \
  54.                 testg_field_ck.dct \
  55.                 testg_field_py.dct \
  56.                 testg_field_ti.dct \
  57.                 testg_field_jt.dct
  58.  
  59.         HELPFILES = \
  60.                 test.index.lock \
  61.                 test.query.lock \
  62.                 test.update.lock \
  63.                 testg.index.lock \
  64.                 testg.query.lock \
  65.                 testg.update.lock
  66.  
  67. all:: $(WAISINDEX) testg.doc test.doc test
  68.  
  69. test.doc: $(SRC) $(WAISINDEX)
  70.     $(WAISINDEX) -t fields -d test $(SRC) 
  71.  
  72. testg.doc: $(SRCG) $(WAISINDEX)
  73.     $(WAISINDEX) -t fields -d testg $(SRCG) 
  74.  
  75. clean::
  76.     $(RM) $(HELPFILES) 
  77.  
  78. veryclean:: clean
  79.     $(RM) $(RESFILES) 
  80. itest:
  81.     $(SWAIS) -S . -s test.src
  82.  
  83. $(SWAIS):
  84.     cd ../ui; $(MAKE) $(SWAIS) 
  85.  
  86. $(WAISINDEX):
  87.     cd ../ir; $(MAKE) $(WAISINDEX) 
  88.  
  89. DependTarget()
  90.  
  91.  
  92. /* Tests */
  93.  
  94. #define TestQuery(testname, words)                                      @@\
  95. test:: testname                                @@\
  96.                                     @@\
  97. testname: Concat(DATABASE,.doc)                                         @@\
  98.     @(echo q;echo q) | $(WAISSEARCH) -d DATABASE words > \
  99.          Concat(testname,.is) 2>&1                @@\
  100.     @-if $(DIFF) Concat(testname,.is) Concat(testname,.should) \
  101.         > /dev/null ; then \
  102.        echo Test testname is ok; \
  103.     else \
  104.        echo Test testname failed; \
  105.     fi;                                @@\
  106.                                     @@\
  107. init:: Concat(init-,testname)                        @@\
  108.                                     @@\
  109. Concat(init-,testname):     Concat(DATABASE,.doc)                          @@\
  110.     (echo q;echo q) | $(WAISSEARCH) -d DATABASE words > \
  111.         Concat(testname,.should) 2>&1      @@\
  112.                                     @@\
  113. clean::                                    @@\
  114.     $(RM) Concat(testname,.is)                    @@\
  115. /*
  116. veryclean::                                @@\
  117.     $(RM) Concat(testname,.should)
  118. */
  119.  
  120. #undef BOOLEAN
  121. #undef LITERAL
  122.  
  123.  
  124. #define DATABASE test
  125. TestQuery(PLAIN,Signature File)
  126. TestQuery(BOOLEAN,peter schauble or retrieval and Xin)
  127. TestQuery(FIELD,au=schauble)
  128. TestQuery(NUMERIC,py==1993)
  129. TestQuery(COMPLEX,"py==1993 and ti=(signature and files) or au=schauble")
  130. TestQuery(PARTIAL,'Schaub*')
  131. TestQuery(LITERAL,"'Schauble, Peter'")
  132. #undef  DATABASE
  133. #define DATABASE testg
  134. TestQuery(GERMAN,"SchÎŁuble")